package flash3.framework
{
	public class UpdateManager extends ListManager
	{
		private var _tick:Tick;
		public function UpdateManager()
		{
			_tick = new Tick();
			_tick.addEventListener(TickEvent.TICK, onHandle);
		}
		
		static public function get i():UpdateManager
		{
			return Singleton.getInstanceOrCreate(UpdateManager) as UpdateManager;
		}
		
		public function onHandle(evt:TickEvent):void
		{
			for(var i:uint=0;i<list.length;i++)
			{
				if(list[i])
					(list[i] as IUpdate).update(evt.interval);
			}
		}
	}
}